<template xmlns="http://www.w3.org/1999/html">
  <views class="employee_list_detail">
    <!-- 从业人员 -->
    <div class="employment">
      <viewTitle :title="'从业人员详情'"></viewTitle>
      <div class="employment_list">
        <!-- 姓名 职位 身份证号 -->
        <div class="name_the_card flex flexR center">
          <div class="flex flexR" style="flex: 240px 0 0">
            <div>姓名：</div>
            <div class="end">{{detail.employee_name}}</div>
          </div>
          <div class="flex flexR" style="flex: 320px 0 0">
            <div>联系方式：</div>
            <div class="end">{{detail.employee_mobile}}</div>
          </div>
          <div class="flex flexR" style="flex: 200px 0 0">
            <div>职业对象：</div>
            <div class="end">{{detail.profession_desc}}</div>
          </div>
        </div>
        <!-- 联系方式 所属企业 -->
        <div class="contact_enterprise flex flexR center">
          <div class="flex flexR" style="flex: 240px 0 0">
            <div>状态：</div>
            <div class="end">{{detail.status_desc}}</div>
          </div>
          <div class="flex flexR" style="flex: 320px 0 0">
            <div>身份证号：</div>
            <div class="end">{{detail.card_no}}</div>
          </div>
          <div class="flex flexR" style="flex: 200px 0 0">
            <div>所属企业：</div>
            <div class="end">{{detail.company_name}}</div>
          </div>
        </div>
        <div class="contact_enterprise flex flexR center">
          <div class="flex flexR">
            <div>注册时间：</div>
            <div class="end">{{detail.ctime}}</div>
          </div>
<!--          <div class="flex flexR">-->
<!--            <div>企业类型：</div>-->
<!--            <div class="end">{{detail.type == 1? '快递': '物流'}}</div>-->
<!--          </div>-->
        </div>
        <!-- 物流行业记录 -->
        <!--<div class="record flex flexR center">-->
          <!--<div class="flex flexC">-->
            <!--<div>物流行业从业记录：</div>-->
            <!--<div-->
              <!--v-for="(item,index) in detail.record"  v-bind:key="index"-->
              <!--class="end"-->
            <!--&gt;{{formatDate(item.record_time)}}&#45;&#45;{{formatType(item.type)}}&#45;&#45;{{item.company_name}}&#45;&#45;{{formatProfession(item.profession)}}</div>-->
          <!--</div>-->
        <!--</div>-->
        <!-- 身份证 -->
        <div class="identity_card">
          <div class="flex flexR">
            <div>身份证：</div>
            <div class="end flex flexR">
<!--              <el-image-->
<!--                lazy-->
<!--                style="width: 100px; height: 100px"-->
<!--                :src="detail.card_img_cons"-->
<!--                :fit="'fill'"-->
<!--              >-->
<!--              </el-image>-->
              <img
                  style="width: 100px; height: 100px"
                  :src="detail.card_img_cons"
                  v-default-img
                  alt
              />
<!--              <el-image-->
<!--                lazy-->
<!--                style="width: 100px; height: 100px"-->
<!--                :src="detail.card_img_pros"-->
<!--                :fit="'fill'"-->
<!--              ></el-image>-->
              <img
                  style="width: 100px; height: 100px"
                  :src="detail.card_img_pros"
                  v-default-img
                  alt
              />
            </div>
          </div>
        </div>
      </div>
      <!-- 返回按钮 -->
      <div class="go_black flex flexR center">
        <el-button type="primary" @click="goBlack">返回</el-button>
      </div>
    </div>
  </views>
</template>
<script>
export default {
  data() {
    return {
      employee_id: "",
      detail: {
        status_desc: "",
        create_time: "",
        card_no: "",
        employee_mobile: "",
        company_name: "",
        record: []
      }
      // type:["","入职","转岗","入职"],
      // profession:["","法人","揽件员"]
    };
  },
  methods: {
    //获取数据
    getData() {
      let post_data={
         employee_id: this.employee_id 
      }
        this.$raxios.post(
        this.$mapapi.admin_detailEmployee,
        { data: post_data }
      ).then(res=>{
        if(res.code==200){
           this.detail = res.data;
           console.log(res.data)
        }else{
          this.tableList = [];
          this.$message.error(res.msg);
          return;
        }
      }).catch(res=>{

      })
    },
    formatDate(timestamp) {
      console.log("timestamp", timestamp);
      return this.$moment(timestamp * 1000).format("YYYY-MM-DD");
    },
    formatType(type) {
      let type_arr = ["", "入职", "转岗", "入职"];
      return type_arr[type];
    },
    formatProfession(profession) {
      let profession_arr = ["", "法人", "揽件员"];
      return profession_arr[profession];
    },
    goBlack() {
      this.$router.go(-1);
    }
  },
  created() {},
  mounted() {
    this.type = this.$route.query.type;
    this.employee_id = this.$route.query.employee_id || 0;
    this.employee_id && this.getData();
  }
};
</script>

<style lang="less" :scope="true"   src="@/style/personnel_manager/employee_list_detail.less">
</style>
